<template>
  <div>
    <!-- 三级导航 -->
    <TypeNav></TypeNav>
    <!-- 轮播图 -->
    <Container></Container>
    <!-- 今日推荐 -->
    <Recommend></Recommend>
    <!-- 商品排行 -->
    <Rank></Rank>
    <!-- 猜你喜欢 -->
    <Like></Like>
    <!-- 楼层一 -->
    <FloorOne v-for="floor in floorsList" :key="floor.id" :floor="floor" :id="floor.id"></FloorOne>
    <!-- 商标 -->
    <Brand></Brand>
  </div>
</template>

<script>
// import TypeNav from "../../components/TypeNav";
import Container from "@/pages/Home/Container";
import Recommend from "@/pages/Home/Recommend";
import Rank from "@/pages/Home/Rank";
import Like from "@/pages/Home/Like";
import FloorOne from "@/pages/Home/FloorOne";
// import FloorOne from "@/pages/Home/FloorOne";
import Brand from "@/pages/Home/Brand";
import { mapState } from 'vuex';

export default {
  name: "Home",
  components: {
    // TypeNav,
    Container,
    Recommend,
    Rank,
    Like,
    FloorOne,
    Brand,
  },
  mounted () {
    this.$store.dispatch('home/getFloorsListData')
  },
  computed: {
    ...mapState('home',['floorsList'])
  }
};
</script>

<style>
</style>